package com.flute.framework.data.mysql;

import java.io.Serializable;

import com.flute.framework.data.constants.Constants;
import com.flute.tools.util.StringUtil;

public final class LimitSQL implements Serializable {
	private static final long serialVersionUID = -3778731562703874213L;
	private String limitClause;

	public String getLimit() {
		return limitClause;
	}

	public void setLimit(String limit) {
		this.limitClause = limit;
	}

	public String toSQL() {
		if (StringUtil.isNullOrEmpty(limitClause)) {
			return Constants.EMPTY;
		}
		return Constants.LIMIT + this.limitClause;
	}
}
